home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / NI6510 / OEMSETUP.INF < prev   
INI File  |  1996-07-31  |  39KB  |  1,476 lines

  1. ;***********************************************************************
  2. ;
  3. ; OEMNADAM.INF
  4. ;
  5. ;       NI6510 network card and driver SETUP INF file.
  6. ;
  7. ; History:
  8. ;***********************************************************************
  9.  
  10. ;-----------------------------------------------------------------------
  11. ; OPTION TYPE
  12. ; -----------
  13. ; This identifies the Option type we are dealing with.  The different
  14. ; possible types are:
  15. ;
  16. ; COMPUTER, DISPLAY, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  17. ;
  18. ;  Types specific to networking:
  19. ;
  20. ; NetAdapter,        a netcard / adapter combination or just a netcard
  21. ; NetDriver,         just a netcard driver
  22. ; NetTransport,      a complete NDIS-compliant TDI transport stack
  23. ; NetService,        an NT networking service
  24. ; NetWork,           a complete network ensemble.
  25. ; NetProvider        a complete network which supports NT MPR protocol
  26. ;-----------------------------------------------------------------------
  27.  
  28. [Identification]
  29.     OptionType = NetAdapter
  30.  
  31. ;-----------------------------------------------------------------------
  32. ; PlatformsSupported
  33. ; ------------------
  34. ; This identifies the platforms supported by the adapter card.
  35. ; Possible types are:
  36. ;
  37. ; ISA and EISA
  38. ;-----------------------------------------------------------------------
  39.  
  40. [PlatformsSupported]
  41.     ISA
  42.     EISA
  43.  
  44. ;-----------------------------------------------------------------------
  45. ; OPTION LIST
  46. ; -----------
  47. ; This section lists the OEM Option key names.  These keys are locale
  48. ; independent and used to represent the option in a locale independent
  49. ; manner.
  50. ;
  51. ;-----------------------------------------------------------------------
  52.  
  53. [Options]
  54.     NI6510
  55.  
  56. ;***********************************************************************
  57. ; CONSTANTS FOR USING DIALOGS
  58. ;***********************************************************************
  59.  
  60. [FileConstants]
  61.  
  62. GenericInfVersion  = " v3.00"
  63. GenericAdapterName = " Racal InterLan XLerator/EB/NI6510"
  64. GenericDriverName  = "Racal InterLan XLerator/EB/NI6510 Ethernet Adapter"
  65. GenericSysName     = "ni6510.sys"
  66. GenericName        = "NI6510"
  67.  
  68.  
  69.  
  70. ;
  71. ;  File names, etc.
  72. ;
  73. UtilityInf      = "UTILITY.INF"
  74. ParamInf        = "NCPARAM.INF"
  75. subroutineinf   = "SUBROUTN.INF"
  76. SoftwareType    = "driver"
  77. Exit_Code       = 0
  78.  
  79. ;
  80. ; EventLog Message File
  81. ;
  82. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  83. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  84.  
  85. ; Product Info
  86. ;
  87. Manufacturer    = "Microsoft"
  88. ProductMajorVersion     = "3"
  89. ProductMinorVersion     = "1"
  90. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  91.  
  92. ;
  93. ; Software
  94. ;
  95. ProductSoftwareName     = "NI6510"
  96. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\"$(GenericSysName)
  97. NetRuleSoftwareType     = "ni6510Sys ndisDriver ni6510Driver"
  98.  
  99. NetRuleSoftwareUse      = $(SoftwareType)
  100. NetRuleSoftwareBindForm = """ni6510Sys"" yes no container"
  101.  
  102. NetRuleSoftwareClass    = {"ni6510Driver basic"}
  103. NetRuleSoftwareBindable = {"ni6510Driver ni6510Adapter non exclusive 100"}
  104. ;
  105. ; Hardware
  106. ;
  107. ProductHardwareName        = "NI6510"
  108. NetRuleHardwareType        = "ni6510 ni6510Adapter"
  109. NetRuleHardwareBindForm    = " yes yes container"
  110. NetRuleHardwareClass       = {"ni6510Adapter basic"}
  111.  
  112.  
  113.  
  114. ;
  115. ; Registry Key
  116. ;
  117. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  118. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  119.  
  120.  
  121. [GeneralConstants]
  122. ;
  123. ;  Program flow control variables.
  124. ;
  125. from      = ""
  126. to        = ""
  127. ;
  128. ;  Return codes; Exit_Code is set to one of these
  129. ;
  130. ExitCodeOk     = 0
  131. ExitCodeCancel = 1
  132. ExitCodeFatal  = 2
  133.  
  134. KeyNull         = ""
  135. MAXIMUM_ALLOWED   = 33554432
  136. RegistryErrorIndex = NO_ERROR
  137. KeyProduct      = ""
  138. KeyParameters   = ""
  139.  
  140. TRUE            = 1
  141. FALSE           = 0
  142. NoTitle            = 0
  143.  
  144. ExitState   = "Active"
  145. OldVersionExisted = $(FALSE)
  146.  
  147. DriverPath      = $(!STF_NTPATH)\drivers
  148.  
  149. [date]
  150.     ; Now is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  151.     ; Minute, Second }
  152.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  153.  
  154.  
  155. ;---------------------------------------------------------------------------
  156. ; 1. Identify
  157. ;
  158. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  159. ;                as we are choosing currently.
  160. ;
  161. ; INPUT:         None
  162. ;
  163. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  164. ;                $($R1): Option Type (COMPUTER ...)
  165. ;                $($R2): Diskette description
  166. ;---------------------------------------------------------------------------
  167.  
  168. [Identify]
  169. ;
  170. ; enable debug message output
  171. ;
  172. ;    set !STF_DISPLAYDEBUGOUTPUT = 1
  173. ;    set !DebugOutputControl = 1    
  174. ;     Debug-Output "Enable debug message output"
  175.  
  176.     ;
  177.     ;
  178.     read-syms Identification
  179.  
  180.     set Status     = STATUS_SUCCESSFUL
  181.     set Identifier = $(OptionType)
  182.     set Media      = #("Source Media Descriptions", 1, 1)
  183.  
  184.     Return $(Status) $(Identifier) $(Media)
  185.  
  186. ;------------------------------------------------------------------------
  187. ; 2. ReturnOptions:
  188. ;
  189. ; DESCRIPTION:   To return the option list supported by this INF and the
  190. ;                localised text list representing the options.
  191. ;
  192. ;
  193. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  194. ;
  195. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  196. ;                                STATUS_NOLANGUAGE
  197. ;                                STATUS_FAILED
  198. ;                                STATUS_NOTSUPPORTED
  199. ;
  200. ;                $($R1): Option List
  201. ;                $($R2): Option Text List
  202. ;------------------------------------------------------------------------
  203.  
  204. [ReturnOptions]
  205.     ;
  206.     ;
  207.     set Status        = STATUS_FAILED
  208.     set OptionList     = {}
  209.     set OptionTextList = {}
  210.  
  211.     ;
  212.     ; Check if the language requested is supported
  213.     ;
  214.     set LanguageList = ^(LanguagesSupported, 1)
  215.     Ifcontains(i) $($0) in $(LanguageList)
  216.     ;
  217.     ; Check if the platforms requested is supported
  218.     ;
  219.     ifstr(i) $($1) == ""
  220.             goto returnoptions
  221.     endif
  222.  
  223.     set PlatformList = ^(PlatformsSupported, 1)
  224.     Ifcontains(i) $($1) in $(PlatformList)
  225.             goto returnoptions
  226.     else
  227.             set Status = STATUS_NOTSUPPORTED
  228.             goto finish_ReturnOptions
  229.     endif
  230.     else
  231.         set Status = STATUS_NOLANGUAGE
  232.         goto finish_ReturnOptions
  233.     endif
  234.  
  235.     ;
  236.     ; form a list of all the options and another of the text representing
  237.     ;
  238.  
  239. returnoptions = +
  240.     set OptionList     = ^(Options, 1)
  241.     set OptionTextList = ^(OptionsText$($0), 1)
  242.     set Status         = STATUS_SUCCESSFUL
  243.  
  244. finish_ReturnOptions = +
  245.     Return $(Status) $(OptionList) $(OptionTextList)
  246.  
  247. ;------------------------------------------------------------------------
  248. ;
  249. ; InstallOption:
  250. ;
  251. ;      This section is shelled to by main installation processing
  252. ;      or by NCPASHEL.INF during reconfig, removal, update, etc.
  253. ;
  254. ;
  255. ; FUNCTION:  To copy files representing Options
  256. ;            To configure the installed option
  257. ;            To update the registry for the installed option
  258. ;
  259. ; INPUT:     $($0):  Language to use
  260. ;            $($1):  OptionID to install
  261. ;            $($2):  SourceDirectory
  262. ;            $($3):  AddCopy  (YES | NO)
  263. ;            $($4):  DoCopy   (YES | NO)
  264. ;            $($5):  DoConfig (YES | NO)
  265. ;
  266. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  267. ;                            STATUS_NOLANGUAGE |
  268. ;                            STATUS_USERCANCEL |
  269. ;                            STATUS_FAILED
  270. ;
  271. ;------------------------------------------------------------------------
  272. [InstallOption]
  273.     ;
  274.     ; Set default values for
  275.     ;
  276.     set Status   = STATUS_FAILED
  277.     ;
  278.     ; extract parameters
  279.     ;
  280.     set Option   = $($1)
  281.     set SrcDir   = $($2)
  282.     set AddCopy  = $($3)
  283.     set DoCopy   = $($4)
  284.     set DoConfig = $($5)
  285.  
  286.     ;
  287.     ; Check if the language requested is supported
  288.     ;
  289.     set LanguageList = ^(LanguagesSupported, 1)
  290.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  291.     Return STATUS_NOLANGUAGE
  292.     endif
  293.  
  294.     set-subst LF = "\n"
  295.  
  296.     read-syms GeneralConstants
  297.     read-syms FileConstants
  298.  
  299.     read-syms DialogConstants$(!STF_LANGUAGE)
  300.     ifstr(i) $(!NTN_Origination) == "NCPA"
  301.     set Continue = $(OK)
  302.     endif
  303.     read-syms FileConstants$(!STF_LANGUAGE)
  304.  
  305.     detect date
  306.  
  307.     set-title  $(FunctionTitle)
  308.  
  309.     set to   = Begin
  310.     set from = Begin
  311. ;
  312. ;  Assume all is well.
  313. ;
  314.     set CommonStatus = STATUS_SUCCESSFUL
  315.  
  316.     EndWait
  317.  
  318. ;
  319. ;   Set up the operation-mode-based variables and gaily welcome
  320. ;   the user.  If the "install mode" variable is improperly set,
  321. ;   assume this is a new installation.
  322. ;
  323.  
  324. Begin = +
  325.     Set ActivateDetection = FALSE
  326.  
  327.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  328.     set StartLabel = removeadapter
  329.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  330.     set StartLabel = UpgradeSoftware
  331.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  332.     set StartLabel = bindingadapter
  333.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  334. ;        set ActivateDetection = TRUE
  335.     set StartLabel = configureadapter
  336.     ;
  337.     ;   You cannot config the software component
  338.     ;
  339.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  340.         Debug-Output "Cannot configure the NI6510 driver software."
  341.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  342.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  343.         Debug-Output "ShellCode error: cannot get an error string."
  344.         goto ShellCodeError
  345.         endif
  346.         set Error = $($R0)
  347.         set from = end
  348.         set to = end
  349.         goto nonfatalinfo
  350.     endif
  351.     else
  352. ;        set ActivateDetection = TRUE
  353.     set StartLabel = installadapter
  354.     set OEM_ABANDON_OPTIONS = {}
  355.     set OEM_ABANDON_SOFTWARE = FALSE
  356.     set OEM_ABANDON_ON = TRUE
  357.     endif
  358.  
  359.  
  360.     ;  set the default values
  361.     ; I/O base = Auto Scan
  362.     ; Duplex mode = Default
  363.     ; GAT = off
  364.  
  365.     set IOBaseAddrValue = *($(IOBaseAddrList), 17)
  366.     set FullDuplexValue = *($(FullDuplexList), 1)
  367.     set GatControlValue = *($(GatControlList), 2)
  368.  
  369.     Set from = $(fatal)
  370.     Set to = $(fatal)
  371.     Goto $(StartLabel)
  372.  
  373. ;-----------------------------------------------
  374. ; Installation Section
  375. ;-----------------------------------------------
  376.  
  377.  
  378. installadapter = +
  379. ;
  380. ;   First, check whether the same version of the software exists
  381. ;
  382.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  383.  
  384.     Ifstr $(KeyProduct) != $(KeyNull)
  385.     ;
  386.     ; Same version already existed in the local machine
  387.     ; Popup the dialog and ask the user whether he wants to continue
  388.     ;
  389.     CloseRegKey $(KeyProduct)
  390.  
  391.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  392.        ;
  393.        ; Cannot Install the same software again
  394.        ;
  395.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  396.            $(ProductVersion)
  397.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  398.            Debug-Output "ShellCode error: cannot get an error string."
  399.            goto ShellCodeError
  400.        endif
  401.  
  402.        goto end
  403.     else
  404.        ;
  405.        ; Add a new adapter card?
  406.        ;
  407.        Shell $(UtilityInf), CardExistedDlg
  408.  
  409.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  410.            Debug-Output "ShellCode error: cannot get an error string."
  411.            goto ShellCodeError
  412.        endif
  413.  
  414.        ifstr(i) $($R1) != "OK"
  415.            goto end
  416.        endif
  417.        set OldVersionExisted = $(TRUE)
  418.     endif
  419.     endif
  420.  
  421.     ; If we're installing a second time, don't re-copy the help file
  422.     ; !!!
  423.     ifint $(OldVersionExisted) == $(FALSE)
  424.     ifstr(i) $(!NTN_InstallMode) == "install"
  425.        Ifstr(i) $(DoCopy) == "YES"
  426.         Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
  427.           
  428.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  429.             Goto ShellCodeError
  430.         Else-Ifstr(i) $($R0) == STATUS_FAILED
  431.             Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  432.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  433.             goto ShellCodeError
  434.             endif
  435.             set Error = $($R0)
  436.             Goto fatal
  437.         Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  438.             Goto successful
  439.         Endif
  440.     
  441.         Set SrcDir = $($R1)
  442.         endif
  443.  
  444.         install "Install-Helpfile"
  445.     endif
  446.     endif
  447.  
  448. ;--    SetHelpFile "ni6510.hlp" 1 11
  449.  
  450. ;
  451. ;  dll load addition
  452. ;
  453.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  454.  
  455.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  456.     Goto ShellCodeError
  457.     Else-Ifstr(i) $($R0) == STATUS_FAILED
  458.     Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  459.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  460.         goto ShellCodeError
  461.     endif
  462.     set Error = $($R0)
  463.     Goto fatal
  464.     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  465.     Goto successful
  466.     Endif
  467.  
  468.     Set SrcDir = $($R1)
  469.  
  470.     install "Install-Dll"
  471.  
  472.     goto adaptersetup
  473.  
  474. ;-----------------------------------------------
  475. ; Configuration Section
  476. ;-----------------------------------------------
  477. ;
  478. ;   Get the current values of all the parameters
  479. ;
  480. configureadapter = +
  481.  
  482. ;--    SetHelpFile "ni6510.hlp" 1 11
  483.  
  484.     Ifstr $(KeyProduct) == $(KeyNull)
  485.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  486.     Ifstr $(KeyProduct) == $(KeyNull)
  487.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  488.         Debug-Output "Cannot find component product key"
  489.         goto fatalregistry
  490.     Endif
  491.     Endif
  492.  
  493.     ;
  494.     ; Get the other parameters;  they're attached to the service parameters key
  495.     ;
  496.     Debug-Output "INF: Shelling to FindService"
  497.     Shell $(UtilityInf) FindService, $(KeyProduct)
  498.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  499.     Debug-Output "INF: FindService shell failure"
  500.     Goto ShellCodeError
  501.     Endif
  502.     Ifstr(i) $($R0) != NO_ERROR
  503.     Debug-Output "INF: FindService Shell error: "$($R0)
  504.     Goto fatalregistry
  505.     endif
  506.  
  507.     Set KeyParameters = $($R2)
  508.  
  509.     ;
  510.     ;  We don't need the services key, so close it.
  511.     ;
  512.     CloseRegKey $($R1)
  513.  
  514.     Ifstr $(KeyParameters) == $(KeyNull)
  515.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  516.     Debug-Output "Cannot find component service"
  517.     goto fatalregistry
  518.     endif
  519.  
  520.     set OldVersionExisted = $(TRUE)
  521.  
  522.     set ValueName = ""
  523.     set ValueData = ""
  524.     set ValueStr  = ""
  525.     set ValueList = {}
  526.  
  527.  
  528.     ;
  529.     ; Get the old values
  530.     ;
  531.     EnumRegValue $(KeyParameters) ValueList
  532.  
  533.     ForListDo $(ValueList)
  534.     set ValueItem = $($)
  535.     set ValueName = *($(ValueItem),1)
  536.     set ValueData = *($(ValueItem),4)
  537.     ifstr(i) $(ValueName) == "IOBase"
  538.         set IOBaseAddrIndex = $(ValueData)
  539.     else-ifstr(i) $(ValueName) == "FDUP"
  540.         set FullDuplexIndex = $(ValueData)
  541.     else-ifstr(i) $(ValueName) == "GAT"
  542.         set GatControlIndex = $(ValueData)
  543.     endif
  544.  
  545.     EndForListDo
  546.  
  547.          
  548.     Ifint $(TPValue) == 0
  549.     Set CheckItemsIn = {"OFF"}
  550.     Else
  551.     Set CheckItemsIn = {"ON"}
  552.     Endif                
  553.     
  554. ; I/O Base:
  555.     set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  556.  
  557.     ifstr(i) $(IOBaseAddrValue) == ""
  558.     set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  559.     endif
  560.  
  561.     Debug-Output $(InfName)" I/o base is "$(IOBaseAddrValue)
  562.  
  563. ; Duplex Mode:
  564.     set FullDuplexValue = *($(FullDuplexList), ~($(FullDuplexValues),$(FullDuplexIndex)))
  565.  
  566.     ifstr(i) $(FullDuplexValue) == ""
  567.     set FullDuplexValue = *($(FullDuplexList), 1)
  568.     endif
  569.  
  570.     Debug-Output $(InfName)" Full Duplex is "$(FullDuplexValue)
  571.  
  572. ; GAT Control:
  573.     set GatControlValue = *($(GatControlList), ~($(GatControlValues),$(GatControlIndex)))
  574.  
  575.     ifstr(i) $(GatControlValue) == ""
  576.     set GatControlValue = *($(GatControlList), 1)
  577.     endif
  578.  
  579.     Debug-Output $(InfName)" GAT Control is "$(GatControlValue)
  580.  
  581.  
  582.     ;  Save the settings as they were read from the Registry.
  583.  
  584. ;    Shell $(ParamInf) Param_SaveValues
  585. ;    Set CurrParamSettings = $($R0)
  586. ;
  587. ;   Put up the adapter configuration dialog if necessary.
  588. ;
  589. ;   Note that $(CurrParamSettings) has the old known parameter values.
  590. ;
  591. adaptersetup = +
  592.  
  593.  
  594. ;    Shell "" DebugConfiguration "before displaying dialog"
  595.  
  596.     Set from = adapteroptions
  597.  
  598.  
  599. adapteroptions = +
  600.  
  601.  
  602.     LoadLibrary "Disk 1" $(DialogDllName) hLib
  603.  
  604.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  605.  
  606.     Debug-Output $(InfName)" I/o base is "$(IOBaseAddrValue)
  607.     Debug-Output $(InfName)" Full Duplex is "$(FullDuplexValue)
  608.     Debug-Output $(InfName)" Gat Control is "$(GatControlValue)
  609.  
  610.  
  611.     ui start "InputDlg"  $(hLib)
  612.  
  613.     set ExitButton      = $(ButtonPressed)
  614.  
  615.     Debug-Output " ButtonPressed "$(ButtonPressed)
  616.  
  617.  
  618.     FreeLibrary $(hLib)
  619.  
  620.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  621.         set IOBaseAddrIndex = $(Combo1Out)
  622.         set FullDuplexIndex = $(Combo2Out)
  623.         set GatControlIndex = $(Combo3Out)
  624.         set ExitButton = $(ButtonPressed)
  625.  
  626.     Set Chk = *($(CheckItemsOut), 1)     
  627.     Ifstr(i) $(Chk) == "ON"
  628.         Set TPValue = 1
  629.     Else
  630.         Set TPValue = 0
  631.     Endif
  632.  
  633.         ui pop 1
  634. ;               goto nextstep
  635.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  636.         set CommonStatus = STATUS_USERCANCEL
  637.         Debug-Output "Action: exit. Bye."
  638.         ui pop 1
  639.         goto end
  640.     else
  641.         ;
  642.         ; Unknow command
  643.         ;
  644.         ui pop 1
  645.  
  646.  
  647.         Debug-Output "Action: unknown. Bye."
  648.         goto end
  649.     endif
  650.  
  651.  
  652.     Debug-Output " Combo list out "$(ComboListItemsOut)
  653.  
  654.  
  655. ;
  656. ;   If installing, go create the necessary keys;
  657. ;   if configuring, they're already open.
  658. ;
  659. skipoptions =+
  660.  
  661.     ifint $(OldVersionExisted) == $(TRUE)                               
  662.     ifstr(i) $(!NTN_InstallMode) == configure
  663.         goto writeparameters
  664.     endif                                                                
  665.     endif
  666.     StartWait
  667.     ;
  668.     ; Add Software Component
  669.     ;
  670.     ifint $(OldVersionExisted) == $(FALSE)
  671.  
  672.     ifstr(i) $(!NTN_InstallMode) == "install"
  673.        Ifstr(i) $(DoCopy) == "YES"
  674.  
  675.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  676.  
  677.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  678.           Goto ShellCodeError
  679.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  680.           Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  681.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  682.               goto ShellCodeError
  683.           endif
  684.           set Error = $($R0)
  685.           Goto fatal
  686.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  687.           Goto successful
  688.           Endif
  689.  
  690.           Set SrcDir = $($R1)
  691.  
  692.        Endif
  693.  
  694.        install "Install-Option"
  695.  
  696.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  697.           Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  698.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  699.           goto ShellCodeError
  700.           endif
  701.           set Error = $($R0)
  702.           goto fatal
  703.        endif
  704.     endif
  705.  
  706.  
  707.  
  708.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  709.         $(ProductSoftwareName), +
  710.         $(ProductSoftwareName), +
  711.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  712.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  713.         $(NetEventDLL)
  714.  
  715.     Set OEM_ABANDON_SOFTWARE = TRUE
  716.  
  717.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  718.         Debug-Output "ShellCode error"
  719.         goto ShellCodeError
  720.     endif
  721.     ;
  722.     ;   At this point:
  723.     ;     $R1 contains the product version key handle;
  724.     ;     $R2 contains the NetRules subkey handle;
  725.     ;     $R3 contains the new Services key handle; and
  726.     ;     $R4 contains the Parameters key
  727.     ;     $R5 contains the Linkage Key
  728.     ;
  729.     set RegistryErrorIndex = $($R0)
  730.     set KeyProduct      = $($R1)
  731.     Set SoftNetRulesKey = $($R2)
  732.     CloseRegKey $($R3)
  733.     CloseRegKey $($R4)
  734.     CloseRegKey $($R5)
  735.  
  736.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  737.         EndWait
  738.         Debug-Output "Registry error: add software components"
  739.         CloseRegKey $(KeyProduct)
  740.         CloseRegKey $(SoftNetRulesKey)
  741.         goto fatalregistry
  742.     endif
  743.  
  744.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  745.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  746.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  747.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  748.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  749.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  750.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  751.  
  752.     Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  753.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  754.         Debug-Output "ShellCode error."
  755.         goto ShellCodeError
  756.     endif
  757.  
  758.     set RegistryErrorIndex = $($R0)
  759.  
  760.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  761.         EndWait
  762.         Debug-Output "Registry error: add value list."
  763.         CloseRegKey $(KeyProduct)
  764.         CloseRegKey $(SoftNetRulesKey)
  765.         goto fatalregistry
  766.     endif
  767.  
  768.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  769.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  770.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  771.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  772.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  773.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  774.  
  775.     Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  776.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  777.         Debug-Output "ShellCode error."
  778.         goto ShellCodeError
  779.     endif
  780.  
  781.     set RegistryErrorIndex = $($R0)
  782.  
  783.     CloseRegKey $(KeyProduct)
  784.     CloseRegKey $(SoftNetRulesKey)
  785.  
  786.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  787.         EndWait
  788.         Debug-Output "Resgitry error: add value list."
  789.         goto fatalregistry
  790.     endif
  791.     endif
  792. ;
  793. ;   Create the HARDWARE\Netcard region and its corresponding service
  794. ;
  795.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  796.  
  797.     ifint $($R4) != -1
  798.     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  799.     endif
  800.  
  801.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  802.     Debug-Output "Cannot add hardware component"
  803.     goto ShellCodeError
  804.     endif
  805.  
  806.     set RegistryErrorIndex = $($R0)
  807.  
  808.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  809.     EndWait
  810.     Debug-Output "Registry error: add hardware component"
  811.     CloseRegKey $($R1)
  812.     CloseRegKey $($R2)
  813.     CloseRegKey $($R3)
  814.     goto fatalregistry
  815.     endif
  816.  
  817. ;
  818. ;   At this point:
  819. ;     $R1  Registry key variable for HARDWARE\Netcard\(n)
  820. ;     $R2  Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  821. ;     $R3  Registry key handle for <service>\Parameters key
  822. ;     $R4  Adapter number assigned to adapter
  823. ;     $R5  Service name generated by combining svc name with adapter number
  824. ;
  825.     set KeyParameters = $($R3)
  826.     set KeyAdapterRules = $($R2)
  827.     set AdapterNumber = $($R4)
  828.  
  829.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  830.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  831.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  832.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  833.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  834.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  835.  
  836.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  837.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  838.     Debug-Output "ShellCode error"
  839.     goto ShellCodeError
  840.     endif
  841.  
  842.     CloseRegKey $($R1)
  843.  
  844.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  845.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  846.  
  847.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  848.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  849.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  850.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  851.  
  852.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  853.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  854.     Debug-Output "ShellCode error."
  855.     goto ShellCodeError
  856.     endif
  857.  
  858.     set RegistryErrorIndex = $($R0)
  859.  
  860.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  861.     EndWait
  862.     Debug-Output "Resgitry error: add value list."
  863.     CloseRegKey $(KeyParameters)
  864.     CloseRegKey $(KeyAdapterRules)
  865.     goto fatalregistry
  866.     endif
  867.  
  868.     CloseRegKey $(KeyAdapterRules)
  869.  
  870.     goto writeparameters
  871. ;
  872. ;   REQUIRED:   $(KeyParameters) contains service Parameters key handle
  873. ;
  874. writeparameters = +
  875.     Shell $(UtilityInf), GetBusTypeNum
  876.     set BusTypeNum = $($R1)
  877. ; Testing the BusNum. We are coding it to 0
  878.     set BusNumberValue = 0 ;
  879. ; End of BusNumber
  880.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  881.     Debug-Output "ShellCode error."
  882.     goto ShellCodeError
  883.     endif
  884.  
  885.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  886.  
  887.     set FullDuplexValue = *($(FullDuplexValues), ~($(FullDuplexList),$(FullDuplexIndex)))
  888.  
  889.     set GatControlValue = *($(GatControlValues), ~($(GatControlList),$(GatControlIndex)))
  890.  
  891.  
  892.  
  893.   ; Ifint $(TPValue) != 0
  894.     set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  895.             {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  896.             {IOBase,  $(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+
  897.             {FDUP,  $(NoTitle),$(!REG_VT_DWORD),$(FullDuplexValue)},+
  898.             {GAT,  $(NoTitle),$(!REG_VT_DWORD),$(GatControlValue)},+
  899.             {BusNumber,  $(NoTitle),$(!REG_VT_DWORD),$(BusNumberValue)}}
  900.  
  901.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  902.  
  903.     CloseRegKey $(KeyParameters)
  904.  
  905.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  906.     Debug-Output "ShellCode error."
  907.     goto ShellCodeError
  908.     endif
  909.  
  910.     set RegistryErrorIndex = $($R0)
  911.  
  912.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  913.     Debug-Output "Registry error: Add value list"
  914.     goto fatalregistry
  915.     endif
  916.  
  917.     EndWait
  918.  
  919.     goto successful
  920.  
  921. ;-----------------------------------------------
  922. ; Binding section
  923. ;-----------------------------------------------
  924. bindingadapter =+
  925.     set Error = "Binding: Sorry, not yet implemented."
  926.     goto fatal
  927.  
  928. ;-----------------------------------------------
  929. ; Removeadapter section
  930. ;-----------------------------------------------
  931.  
  932. removeadapter = +
  933.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  934.     ; Remove Software Component
  935.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  936.         $(ProductSoftwareName)
  937.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  938.         Debug-Output "ShellCode error"
  939.         goto ShellCodeError
  940.     endif
  941.  
  942.     set RegistryErrorIndex = $($R0)
  943.  
  944.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  945.         goto fatalregistry
  946.     endif
  947.     else
  948.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  949.         $(ProductSoftwareName), $(!NTN_RegBase)
  950.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  951.         Debug-Output "ShellCode error"
  952.         goto ShellCodeError
  953.     endif
  954.  
  955.     set RegistryErrorIndex = $($R0)
  956.  
  957.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  958.         goto fatalregistry
  959.     endif
  960.     endif
  961.  
  962.     goto end
  963.  
  964. ;-----------------------------------------------
  965. ; Upgrade Software section
  966. ;-----------------------------------------------
  967.  
  968. UpgradeSoftware = +
  969.     ;
  970.     ; First determine whether we want to do upgrade or update for software
  971.     ; or hardware component. Then we will determine whether the Mode is
  972.     ; update or upgrade.
  973.     ;
  974.     ; If the same version of the product existed in the registry, we do
  975.     ; update. Otherwise, we will do a upgrade
  976.     ;
  977.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  978.     ; Upgrade software component
  979.     ;
  980.     ; see whether the same version exist or not
  981.     ;
  982.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  983.  
  984.     Ifstr $(KeyProduct) != $(KeyNull)
  985.         GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  986.         set Version = *($(VersionInfo), 4)
  987.  
  988.         ;
  989.         ; Update the binaries
  990.         ;
  991.         Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  992.  
  993.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  994.         Debug-Output "ShellCode error"
  995.         goto ShellCodeError
  996.         endif
  997.  
  998.         set !UG_Filename = $($R0)
  999.  
  1000.         ifstr(i) $(!UG_Filename) != ""
  1001.         install "Install-Update"
  1002.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1003.             goto fatal
  1004.         endif
  1005.         endif
  1006.  
  1007.         ; Upgrade the version number
  1008.         ;
  1009.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1010.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1011.  
  1012.         ;
  1013.         ; do nothing for update
  1014.         ;
  1015.         ifint $(Version) != $(ProductVersion)
  1016.            ;
  1017.            ; If the major version number is not the same,
  1018.            ; it is major upgrade. So let Upgrade the product
  1019.            ;
  1020.            ;
  1021.            ; make other upgrade change if necessary
  1022.            ;
  1023.         endif
  1024.         CloseRegKey $(KeyProduct)
  1025.     else
  1026.         ;
  1027.         ; Cannot Open software key, goto ERROR
  1028.         ;
  1029.         goto fatalregistry
  1030.     endif
  1031.     else
  1032.     ;
  1033.     ; upgrade/update hardware component
  1034.     ; There is no different between upgrade and update for hardware
  1035.     ; component
  1036.     ;
  1037.     ; 1. Get the Service Name
  1038.     ; 2. Change the NetRule section if necessary
  1039.     ;
  1040.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  1041.           $(MAXIMUM_ALLOWED) NetworkCardKey
  1042.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  1043.         ;
  1044.         ; Get Service name
  1045.         ;
  1046.         GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1047.         set ServiceName = *($(ServiceNameInfo), 4)
  1048.  
  1049.         ;
  1050.         ; Change the NetRule if necessary
  1051.         ;
  1052.         OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1053.         $(MAXIMUM_ALLOWED) NetRuleKey
  1054.         Ifstr(i) $(NetRuleKey) != $(KeyNull)
  1055.         ;
  1056.         ; Make the change....
  1057.         ;
  1058.         else
  1059.         ;
  1060.         ; Error, cannot open net rules key
  1061.         ;
  1062.         goto fatalregistry
  1063.         endif
  1064.  
  1065.         CloseRegKey $(NetRules)
  1066.         CloseRegKey $(NetworkCardKey)
  1067.     else
  1068.         ;
  1069.         ; Error, cannot open network card key
  1070.         ;
  1071.         goto fatalregistry
  1072.     endif
  1073.     ;
  1074.     ; 3. Change the service section of the hardware. i.e.,
  1075.     ;    ParameterName change, value change, etc.
  1076.     ;
  1077.     OpenRegKey $(!REG_H_LOCAL) "" +
  1078.           $(!NTN_ServiceBase)"\"$(ServiceName) +
  1079.           $(MAXIMUM_ALLOWED) ServiceKey
  1080.  
  1081.     Ifstr(i) $(ServiceKey) != $(KeyNull)
  1082.         ;
  1083.         ; Get the ServiceKey to change the Start value
  1084.         ; or Type value. Or open Parameters key to
  1085.         ; change the hardware parameters if necessary.
  1086.         ;
  1087.         CloseRegKey $(ServiceKey)
  1088.     else
  1089.         ;
  1090.         ; Error, cannot open network card key
  1091.         ;
  1092.         goto fatalregistry
  1093.     endif
  1094.     endif
  1095.  
  1096.     goto end
  1097.     ;
  1098.     ; End of Upgrade Software
  1099.     ;
  1100.  
  1101. ;
  1102. ;  Escape hatches
  1103. ;
  1104. successful = +
  1105.     goto end
  1106.  
  1107. abandon = +
  1108.     ForListDo $(OEM_ABANDON_OPTIONS)
  1109.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1110.         $(ProductSoftwareName), $($)
  1111.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1112.         Debug-Output "ShellCode error"
  1113.         goto ShellCodeError
  1114.     endif
  1115.  
  1116.     set RegistryErrorIndex = $($R0)
  1117.  
  1118.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1119.         goto fatalregistry
  1120.     endif
  1121.     EndForListDo
  1122.  
  1123.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1124.     ; Remove Software Component
  1125.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1126.         $(ProductSoftwareName), FALSE
  1127.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1128.         Debug-Output "ShellCode error"
  1129.         goto ShellCodeError
  1130.     endif
  1131.  
  1132.     set RegistryErrorIndex = $($R0)
  1133.  
  1134.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1135.         goto fatalregistry
  1136.     endif
  1137.     endif
  1138.  
  1139.     goto end
  1140.  
  1141. ;
  1142. ; warning display
  1143. ;
  1144. warning = +
  1145.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1146.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1147.     goto ShellCodeError
  1148.     endif
  1149.     ifstr(i) $($R1) == "OK"
  1150.     goto $(to)
  1151.     else-ifstr(i) $($R1) == "CANCEL"
  1152.     goto $(from)
  1153.     else
  1154.     goto "end"
  1155.     endif
  1156. ;
  1157. ; non fatal error display
  1158. ;
  1159. nonfatalinfo = +
  1160.     Set Severity = STATUS
  1161.     Set CommonStatus = STATUS_USERCANCEL
  1162.     goto nonfatalmsg
  1163. nonfatal = +
  1164.     Set Severity = NONFATAL
  1165.     goto nonfatalmsg
  1166. nonfatalmsg = +
  1167.     ifstr(i) $(Error) == ""
  1168.     Set Severity = NONFATAL
  1169.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1170.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1171.         goto ShellCodeError
  1172.     endif
  1173.     set Error = $($R0)
  1174.     endif
  1175.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1176.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1177.     goto ShellCodeError
  1178.     endif
  1179.     ifstr(i) $($R1) == "OK"
  1180.     goto $(from)
  1181.     else
  1182.     goto "end"
  1183.     endif
  1184.  
  1185. ;
  1186. ;  Registry is broken
  1187. ;
  1188. fatalregistry = +
  1189.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1190.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1191.     goto ShellCodeError
  1192.     endif
  1193.     set Error = $($R0)
  1194.     goto fatal
  1195. ;
  1196. ;  Netcard detection failure
  1197. ;
  1198. fataldetect = +
  1199.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1200.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1201.     Debug-Output "ShellCode error: cannot get an error string."
  1202.     goto ShellCodeError
  1203.     endif
  1204.     set Error = $($R0)
  1205.     Goto fatal
  1206. ;
  1207. ; fatal error display
  1208. ;
  1209. fatal = +
  1210.     ifstr(i) $(Error) == ""
  1211.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1212.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1213.         goto ShellCodeError
  1214.     endif
  1215.     set Error = $($R0)
  1216.     endif
  1217.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1218.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1219.     goto ShellCodeError
  1220.     endif
  1221.  
  1222.     goto setfailed
  1223.  
  1224. ;
  1225. ;  Shelling error
  1226. ;
  1227. ShellCodeError = +
  1228.     set DlgType      = "MessageBox"
  1229.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1230.     set STF_MB_TEXT  = $(ShellCodeErrorText) 
  1231.     set STF_MB_TYPE  = 1
  1232.     set STF_MB_ICON  = 3
  1233.     set STF_MB_DEF   = 1
  1234.     ui start "Error Message"
  1235.     goto setfailed
  1236.  
  1237. setfailed = +
  1238.     set CommonStatus = STATUS_FAILED
  1239.     ;
  1240.     ; if OEM_ABANDON_ON == TRUE, then remove the registry entries
  1241.     ;
  1242.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1243.     set OEM_ABANDON_ON = FALSE
  1244.     goto abandon
  1245.     endif
  1246.     goto end
  1247.  
  1248. end = +
  1249.     goto term
  1250.  
  1251. term = +
  1252.  
  1253.     Return $(CommonStatus)
  1254.  
  1255. [DebugConfiguration]
  1256.  
  1257.     Set InfName = "OEMNADAM.INF"
  1258.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  1259.     Debug-Output $(InfName)" IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  1260.     Debug-Output $(InfName)" FullDuplexValue is "$(!p:FullDuplexValue)
  1261.     Debug-Output $(InfName)" GatControlValue is "$(!p:GatControlValue)
  1262.  
  1263.     return
  1264.  
  1265.  
  1266. ;***************************************************************
  1267. ;  INSTALL SECTIONS
  1268. ;***************************************************************
  1269. [Install-Option]
  1270.     set STF_VITAL = ""
  1271.  
  1272.     ifstr(i) $(AddCopy) == "YES"
  1273.  
  1274.     ;
  1275.     ; Add the files to the copy list
  1276.     ;
  1277.     ;  BUGBUG: eliminate the "nt2" in the next line when Sunil fixes
  1278.     ;      the other INF files
  1279.     ;
  1280.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1281.  
  1282.     endif
  1283.  
  1284.     ifstr(i) $(DoCopy) == "YES"
  1285.  
  1286.        ;
  1287.        ; Copy files in the copy list
  1288.        ;
  1289.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1290.        CopyFilesInCopyList
  1291.  
  1292.     endif
  1293.  
  1294.     Exit
  1295.  
  1296. [Install-Update]
  1297.    set STF_VITAL        = ""
  1298.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1299.    ;set STF_VERSION     = "YES"
  1300.  
  1301.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1302.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1303.  
  1304.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1305.    CopyFilesInCopyList
  1306.  
  1307.    exit
  1308.  
  1309. [Install-Helpfile]
  1310.    Debug-Output "At Install-Helpfile"
  1311.    set STF_VITAL        = ""
  1312.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1313.    ;set STF_VERSION     = "YES"
  1314.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1315.     
  1316. ;--   AddSectionFilesToCopyList Files-hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1317. ;--   CopyFilesInCopyList
  1318.  
  1319.    exit
  1320.  
  1321. [Install-Dll]
  1322.    set STF_VITAL        = ""
  1323.    AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1324.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1325.    CopyFilesInCopyList
  1326.    exit
  1327.  
  1328. [Source Media Descriptions]
  1329.     1  = "NI6510 Driver Disk"  
  1330. ;   2  = "Windows NT Setup CD-ROM Disk " 
  1331. ;   99  = "LMHOST disk"
  1332.  
  1333. [Signature]
  1334.     FileType = MICROSOFT_DRVLIB_FILE
  1335. [GetSignature]
  1336.     read-syms Signature
  1337.     return $(FileType)
  1338.  
  1339. [ProductType]
  1340. STF_PRODUCT  = Winnt
  1341. STF_PLATFORM = I386
  1342.  
  1343.  
  1344. [Files-Inf]
  1345. 1, oemsetup.inf,    SIZE=50000,     RENAME=$(!UG_Filename)
  1346.  
  1347. [Files-NI6510]
  1348. 1, ni6510.SYS , SIZE=88888
  1349.  
  1350. [Files-Dll]
  1351. 1, ni6510.dll,  SIZE=10000
  1352.  
  1353. [Files-hlp]
  1354. ;-- 1, NI6510.HLP, SIZE=12208
  1355.  
  1356.  
  1357. [LanguagesSupported]
  1358.     ENG
  1359.  
  1360. [OptionsTextENG]
  1361.     NI6510     = "Racal InterLan XLerator/EB/NI6510 Ethernet Adapter"
  1362.  
  1363. [FileConstantsENG]
  1364. ProCaption   = "Windows NT Setup"
  1365. ProCancel    = "Cancel"
  1366. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1367.            "Are you sure you want to cancel copying files?"
  1368. ProCancelCap = "Network Setup Message"
  1369. ProText1     = "Copying:"
  1370. ProText2     = "To:"
  1371.  
  1372. ;yck FunctionTitle   = $(GenericAdapterName)" Card Setup"$(GenericInfVersion)
  1373. FunctionTitle   = "Racal InterLan XLerator/EB/NI6510 Setup"$(GenericInfVersion)
  1374.  
  1375. ProductSoftwareDescription = $(GenericDriverName)
  1376. ProductHardwareDescription = $(GenericAdapterName)
  1377. ProductHardwareNI6510Description="Racal InterLan XLerator/EB/NI6510 Driver"
  1378.  
  1379. ProductSoftwareTitle =       $(GenericDriverName)
  1380. ProductHardwareNI6510Title =       $(GenericAdapterName)
  1381.  
  1382. DialogDllName   = "ni6510.dll"
  1383.  
  1384.  
  1385. IOBaseAddrList = ^(IOBaseAddrChoices, 1)
  1386. IOBaseAddrValues = ^(IOBaseAddrChoices, 2)
  1387.  
  1388. DMAChannelList = ^(DMAChannelChoices,1)
  1389. DMAChannelValues = ^(DMAChannelChoices,2)
  1390.  
  1391. LEDList = ^(LEDChoices,1)
  1392. LEDValues = ^(LEDChoices,2)
  1393.  
  1394. FullDuplexList = ^(FullDuplexChoices,1)
  1395. FullDuplexValues = ^(FullDuplexChoices,2)
  1396.  
  1397. GatControlList = ^(GatControlChoices,1)
  1398. GatControlValues = ^(GatControlChoices,2)
  1399.  
  1400.  
  1401.  
  1402. [DialogConstantsENG]
  1403. Help        = "&Help"
  1404. Exit        = "Cancel"
  1405. OK          = "&OK"
  1406. HelpContext = ""
  1407. Continue    = "Continue"
  1408. Cancel      = "&Cancel"
  1409.  
  1410. [MemoryMappedChoicesENG]
  1411. Map_1 = 1, "ON"
  1412. Map_2 = 0, "OFF"
  1413.  
  1414. [FileDependentDlgENG]
  1415.  
  1416. DlgText = "Please select values for the following fields:"
  1417.  
  1418. DlgType = "RadioCombination"
  1419. DlgTemplate = "PCNTN3"
  1420. Caption = $(FunctionTitle)
  1421.  
  1422.  
  1423. CBOptionsGreyed = {}
  1424. NotifyFields = {NO, NO}
  1425. HelpContext = 1
  1426.  
  1427. Combo1Label = "I/O &Port Address:"
  1428. Combo2Label = "&Duplex Mode:"
  1429. Combo3Label = "&GAT Control:"
  1430.  
  1431. BigButton   = "More ni6510 BS >>"
  1432.  
  1433. Combo1List = $(IOBaseAddrList)
  1434. Combo1Out  = $(IOBaseAddrValue)
  1435.  
  1436. Combo2List = $(FullDuplexList)
  1437. Combo2Out  = $(FullDuplexValue)
  1438.  
  1439. Combo3List = $(GatControlList)
  1440. Combo3Out  = $(GatControlValue)
  1441.  
  1442. ComboListItemsIn  = {Combo1List,Combo2List,Combo3List}
  1443. ComboListItemsOut = {Combo1Out,Combo2Out,Combo3Out}
  1444.  
  1445. EditTextIn = ""
  1446. EditTextLim = ""
  1447.  
  1448. [IOBaseAddrChoices]
  1449. IOBase_1  = "0x200",512
  1450. IOBase_2  = "0x220",544
  1451. IOBase_3  = "0x240",576
  1452. IOBase_4  = "0x260",608
  1453. IOBase_5  = "0x280",640
  1454. IOBase_6  = "0x2a0",672
  1455. IOBase_7  = "0x2c0",714
  1456. IOBase_8  = "0x2e0",746
  1457. IOBase_9  = "0x300",768
  1458. IOBase_10 = "0x320",800
  1459. IOBase_11 = "0x340",832
  1460. IOBase_12 = "0x360",864
  1461. IOBase_13 = "0x380",896
  1462. IOBase_14 = "0x3a0",928
  1463. IOBase_15 = "0x3c0",960
  1464. IOBase_16 = "0x3e0",992
  1465. IOBase_17 = "Auto_Scan",0
  1466.  
  1467. [FullDuplexChoices]
  1468. FULLDUPLEX_1 = "Default",0
  1469. FULLDUPLEX_2 = "Half",1
  1470. FULLDUPLEX_3 = "Full",2
  1471.  
  1472. [GatControlChoices]
  1473. GatControl_1 = "Default",0
  1474. GatControl_2 = "Off",1
  1475. GatControl_3 = "On",2
  1476.